<?php
//include_once("king_head.php");
?>
<!--<H2> Files To Download. </H2><BR><BR>-->
<Select name="dwnlst">
<?php
$hnd=opendir("./downloads_".$_SESSION['SITE_ID']);
while($file=readdir($hnd))
{	
	if($file!="." && $file!=".." && $file!="WS_FTP.LOG" && $file!="Thumbs.db")
	{?>
	<option value="<?php echo $file; ?>"><?php echo $file;?></option>
	<?php }	
}
closedir($hnd);
?>
</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<input type="button" name="dwnld" value="Download" onclick="insertAtCaret(document.frm.page_content, 
     ' <a href=&quot;f_dwnld.php?site_id=<?php echo $_SESSION['SITE_ID'];?>&fname='+ document.frm.dwnlst[document.frm.dwnlst.selectedIndex].value + ' &quot; target=&quot;_blank&quot;>Download: '+document.frm.dwnlst[document.frm.dwnlst.selectedIndex].value +'</a> ');">
<?php
//include_once("king_foot.php");
?>